@for(item in list){
@if(item.type == 1){
<div>
    <div style="padding-right: 0;border-right: 1px solid #dddddd">
        <div class="panel-heading" style="background: #ebfaff;border: 1px solid #dddddd;border-bottom: none;padding: 0;">
            <h3 class="panel-title" style="margin:0;border-right: none;display: flex;font-weight: 100;">
                <div class="clearfix" style="flex: 6;padding: 10px 0 10px 15px;border-right: 1px solid #dddddd">
                    <span>初诊病历</span>
                    <span>|</span>
                    <span>诊断：${item.diagnose}</span>
                    <span>|</span>
                    <span>治疗：${item.remedyPlan}</span>
                    <span>${item.finnallyTime}</span>
                    <a data-toggle="collapse" data-parent="#accordion" href="#${item.id}">
                        <span style="float: right;width: 65px;color: #00A8CB" class="details">详情<span style="vertical-align: middle;margin-left: 5px;" class="glyphicon glyphicon-triangle-right"></span></span>
                    </a>
                </div>
                <div style="flex: 1;padding: 10px 15px 10px 0;text-align: center;color: #00A8CB">
                    <a href="javascript:;" style="margin-right: 25px;color: #00A8CB" onclick="CaseTableList.updateCase('${item.id}')">编辑</a>
                    <a href="javascript:;" style="color: #00A8CB">删除</a>
                </div>
            </h3>
        </div>
        <div id="${item.id}" class="panel-collapse collapse">
            <div class="panel-body" style="padding: 0 15px 0 10px;display: flex">
                <div style="flex: 6;border-right: 1px solid #dddddd">
                    <ul style="padding-right: 15px;" class="clearfix ulBox">
                        <li class="row">
                            <div class="col-sm-12"><span style="font-weight: bold;">主诉：</span><span>${item.zhushu}</span>
                            </div>
                        </li>
                        <li class="row">
                            <div class="col-sm-12"><span style="font-weight: bold;">现病史：</span><span>${item.nowMedicalHistory}</span>
                            </div>
                        </li>
                        <li class="row">
                            <div class="col-sm-12"><span style="font-weight: bold;">既往史：</span><span>${item.beforeMedicalHistory}</span>
                            </div>
                        </li>
                        <li class="row">
                            <div value="${item.id}1" id="${item.id}1"></div>
                        </li>
                        <li class="row">
                            <div value="${item.id}2" id="${item.id}2"></div>
                        </li>
                        <li class="row">
                            <div value="${item.id}3" id="${item.id}3"></div>
                        </li>
                        <li class="row">
                            <div value="${item.id}4" id="${item.id}4"></div>
                        </li>
                        <li class="row">
                            <div value="${item.id}5" id="${item.id}5"></div>
                        </li>
                        <li class="row">
                            <div class="col-sm-12">
                                <span style="font-weight: bold;">医嘱：</span><span>${item.doctorAdvice}</span>
                            </div>
                        </li>
                        <li class="row">
                            <div class="col-sm-12">
                                <span style="font-weight: bold;">备注：</span><span>${item.remarkss}</span>
                            </div>
                        </li>
                        <li class="row" style="border: none">
                            <div class="col-sm-12" style="text-align: center">
                                <button type="button" style="background: white;border: 1px solid #cccccc" class="btn" onclick="CaseTableList.prints('${item.id}')">打印病历</button>
                            </div>
                        </li>
                    </ul>
                </div>
                <div style="flex: 1">
                    <h3 style="padding-left: 40px; margin: 20px 0">医生：${item.doctorId}</h3>
                    <h3 style="padding-left: 40px; margin: 20px 0">护士：${item.nurseId}</h3>
                </div>
            </div>
        </div>
    </div>
</div>
@}
@if(item.type == 2){
<div>
    <div style="padding-right: 0;border-right: 1px solid #dddddd">
        <div class="panel-heading" style="background: #ebfaff;border: 1px solid #dddddd;border-bottom: none;padding: 0;">
            <h3 class="panel-title" style="margin:0;border-right: none;display: flex;font-weight: 100;">
                <div class="clearfix" style="flex: 6;padding: 10px 0 10px 15px;border-right: 1px solid #dddddd">
                    <span>复诊病历</span>
                    <a data-toggle="collapse" data-parent="#accordion" href="#${item.id}">
                        <span style="float: right;width: 65px;color: #00A8CB" class="details">详情<span style="vertical-align: middle;margin-left: 5px;" class="glyphicon glyphicon-triangle-right"></span></span>
                    </a>
                </div>
                <div style="flex: 1;padding: 10px 15px 10px 0;text-align: center;color: #00A8CB">
                    <a href="javascript:;" style="margin-right: 25px;color: #00A8CB" onclick="CaseTableList.updateCase('${item.id}')">编辑</a>
                    <a href="javascript:;" style="color: #00A8CB">删除</a>
                </div>
            </h3>
        </div>
        <div id="${item.id}" class="panel-collapse collapse">
            <div class="panel-body" style="padding: 0 15px 0 10px;display: flex">
                <div style="flex: 6;border-right: 1px solid #dddddd">
                    <ul style="padding-right: 15px;" class="clearfix ulBox">
                        <li class="row">
                            <div class="col-sm-12"><span style="font-weight: bold;">复诊：</span><span>${item.zhushu}</span>
                            </div>
                        </li>
                        <li class="row">
                            <div value="${item.id}1" id="${item.id}1"></div>
                        </li>
                        <li class="row">
                            <div value="${item.id}2" id="${item.id}2"></div>
                        </li>
                        <li class="row">
                            <div value="${item.id}3" id="${item.id}3"></div>
                        </li>
                        <li class="row">
                            <div value="${item.id}4" id="${item.id}4"></div>
                        </li>
                        <li class="row">
                            <div value="${item.id}5" id="${item.id}5"></div>
                        </li>
                        <li class="row">
                            <div class="col-sm-12">
                                <span style="font-weight: bold;">医嘱：</span><span>${item.doctorAdvice}</span>
                            </div>
                        </li>
                        <li class="row" style="border: none">
                            <div class="col-sm-12" style="text-align: center">
                                <button type="button" style="background: white;border: 1px solid #cccccc" class="btn" onclick="CaseTableList.printss('${item.id}')">打印病历</button>
                            </div>
                        </li>
                    </ul>
                </div>
                <div style="flex: 1">
                    <h3 style="padding-left: 40px; margin: 20px 0">医生：${item.doctorId}</h3>
                    <h3 style="padding-left: 40px; margin: 20px 0">护士：${item.nurseId}</h3>
                </div>
            </div>
        </div>
    </div>
</div>
@}
<script>
    $.ajax({
        type: "post",
        url: Feng.ctxPath + "/doctorLooked/getCaseData",
        dataType: "json",
        data: {
            "id": '${item.id}'
        },
        success: function (data) {
            var s1 = "";
            var s2 = "";
            var s3 = "";
            var s4 = "";
            var s5 = "";
            for(var i=0 ; i<data.length ; i++) {
                if (data[i].yaType == 1) {
                    s1 += '<div>\n' +
                        '                <div class="col-sm-2 typeStyle" style="font-weight: bold;width: 9%">口腔检查：</div>\n' +
                        '                <div class="col-sm-2"\n' +
                        '                     style="height:50px;display: flex;flex-wrap:wrap;">\n' +
                        '                    <input class="tool_ipt"\n' +
                        '                           style="border-right: 1px solid black;border-bottom: 1px solid black;text-align: right;padding-right: 4px"\n' +
                        '                           value="' + data[i].leftUp + '">\n' +
                        '                    <input class="tool_ipt"\n' +
                        '                           style="border-bottom: 1px solid black;padding-left: 4px"\n' +
                        '                           value="' + data[i].rightUp + '">\n' +
                        '                    <input class="tool_ipt"\n' +
                        '                           style="border-right: 1px solid black;text-align: right;padding-right: 4px"\n' +
                        '                           value="' + data[i].leftDown + '">\n' +
                        '                    <input class="tool_ipt" style="padding-left: 4px" value="' + data[i].rightDown + '">\n' +
                        '                </div>\n' +
                        '                <div class="col-sm-8 typeStyle">' + data[i].remarks + '</div>\n' +
                        '            </div>'
                }else if(data[i].yaType == 2){
                    s2 += '<div>\n' +
                        '                <div class="col-sm-2 typeStyle" style="font-weight: bold;width: 9%">辅助检查：</div>\n' +
                        '                <div class="col-sm-2"\n' +
                        '                     style="height:50px;display: flex;flex-wrap:wrap;">\n' +
                        '                    <input class="tool_ipt"\n' +
                        '                           style="border-right: 1px solid black;border-bottom: 1px solid black;text-align: right;padding-right: 4px"\n' +
                        '                           value="' + data[i].leftUp + '">\n' +
                        '                    <input class="tool_ipt"\n' +
                        '                           style="border-bottom: 1px solid black;padding-left: 4px"\n' +
                        '                           value="' + data[i].rightUp + '">\n' +
                        '                    <input class="tool_ipt"\n' +
                        '                           style="border-right: 1px solid black;text-align: right;padding-right: 4px"\n' +
                        '                           value="' + data[i].leftDown + '">\n' +
                        '                    <input class="tool_ipt" style="padding-left: 4px" value="' + data[i].rightDown + '">\n' +
                        '                </div>\n' +
                        '                <div class="col-sm-8 typeStyle">' + data[i].remarks + '</div>\n' +
                        '            </div>'
                }else if(data[i].yaType == 3){
                    s3 += '<div>\n' +
                        '                <div class="col-sm-2 typeStyle" style="font-weight: bold;width: 9%">诊断：</div>\n' +
                        '                <div class="col-sm-2"\n' +
                        '                     style="height:50px;display: flex;flex-wrap:wrap;">\n' +
                        '                    <input class="tool_ipt"\n' +
                        '                           style="border-right: 1px solid black;border-bottom: 1px solid black;text-align: right;padding-right: 4px"\n' +
                        '                           value="' + data[i].leftUp + '">\n' +
                        '                    <input class="tool_ipt"\n' +
                        '                           style="border-bottom: 1px solid black;padding-left: 4px"\n' +
                        '                           value="' + data[i].rightUp + '">\n' +
                        '                    <input class="tool_ipt"\n' +
                        '                           style="border-right: 1px solid black;text-align: right;padding-right: 4px"\n' +
                        '                           value="' + data[i].leftDown + '">\n' +
                        '                    <input class="tool_ipt" style="padding-left: 4px" value="' + data[i].rightDown + '">\n' +
                        '                </div>\n' +
                        '                <div class="col-sm-8 typeStyle">' + data[i].remarks + '</div>\n' +
                        '            </div>'
                }else if(data[i].yaType == 4){
                    s4 += '<div>\n' +
                        '                <div class="col-sm-2 typeStyle" style="font-weight: bold;width: 9%">治疗计划：</div>\n' +
                        '                <div class="col-sm-2"\n' +
                        '                     style="height:50px;display: flex;flex-wrap:wrap;">\n' +
                        '                    <input class="tool_ipt"\n' +
                        '                           style="border-right: 1px solid black;border-bottom: 1px solid black;text-align: right;padding-right: 4px"\n' +
                        '                           value="' + data[i].leftUp + '">\n' +
                        '                    <input class="tool_ipt"\n' +
                        '                           style="border-bottom: 1px solid black;padding-left: 4px"\n' +
                        '                           value="' + data[i].rightUp + '">\n' +
                        '                    <input class="tool_ipt"\n' +
                        '                           style="border-right: 1px solid black;text-align: right;padding-right: 4px"\n' +
                        '                           value="' + data[i].leftDown + '">\n' +
                        '                    <input class="tool_ipt" style="padding-left: 4px" value="' + data[i].rightDown + '">\n' +
                        '                </div>\n' +
                        '                <div class="col-sm-8 typeStyle">' + data[i].remarks + '</div>\n' +
                        '            </div>'
                }else if(data[i].yaType == 5){
                    s5 += '<div>\n' +
                        '                <div class="col-sm-2 typeStyle" style="font-weight: bold;width: 9%">处置：</div>\n' +
                        '                <div class="col-sm-2"\n' +
                        '                     style="height:50px;display: flex;flex-wrap:wrap;">\n' +
                        '                    <input class="tool_ipt"\n' +
                        '                           style="border-right: 1px solid black;border-bottom: 1px solid black;text-align: right;padding-right: 4px"\n' +
                        '                           value="' + data[i].leftUp + '">\n' +
                        '                    <input class="tool_ipt"\n' +
                        '                           style="border-bottom: 1px solid black;padding-left: 4px"\n' +
                        '                           value="' + data[i].rightUp + '">\n' +
                        '                    <input class="tool_ipt"\n' +
                        '                           style="border-right: 1px solid black;text-align: right;padding-right: 4px"\n' +
                        '                           value="' + data[i].leftDown + '">\n' +
                        '                    <input class="tool_ipt" style="padding-left: 4px" value="' + data[i].rightDown + '">\n' +
                        '                </div>\n' +
                        '                <div class="col-sm-8 typeStyle">' + data[i].remarks + '</div>\n' +
                        '            </div>'
                }
            }
            $("div[value='${item.id}1']").html(s1);
            $("div[value='${item.id}2']").html(s2);
            $("div[value='${item.id}3']").html(s3);
            $("div[value='${item.id}4']").html(s4);
            $("div[value='${item.id}5']").html(s5);
        },
        error: function (data) {
            alert('没有权限，请联系系统管理员!');
            parent.layer.close(parent.layer.getFrameIndex(window.name));
        }
    });
</script>
@}